import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;
import java.util.Scanner;

/**
 * @Title: 串
 * @Author 贾金博
 * @Package PACKAGE_NAME
 * @Date 2024/3/8 15:52
 * @description:
 */
public class 串 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        String s = "";
        Random random = new Random();
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("t12.in"));
        BufferedWriter bufferedWriter2 = new BufferedWriter(new FileWriter("t12.out"));
        for(int i = 1; i <= 1e5; ++ i ) {
            int x = random.nextInt(2);
            s += x;
        }
    //    s = sc.next();
        bufferedWriter.write(s);

        int ans = 0;
        for(int i=0; i<s.length() - 1;)
        {
            if((s.charAt(i)=='0'&&s.charAt(i + 1)=='1')||(s.charAt(i)=='1'&&s.charAt(i + 1)=='0'))
            {
                ans++;
                i+=2;
            }
            else i++;
        }
        bufferedWriter2.write(ans + " ");
        bufferedWriter.flush();
        bufferedWriter2.flush();
//        System.out.println(ans);
    }
}


